package com.fa.domain;
import com.fa.common.annotation.Excel;
import com.fa.common.core.domain.BaseEntity;
import com.fa.common.warehouse.WarehouseCodeCheck;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class Warehouse extends BaseEntity {
    @Excel(name = "仓库ID")
    private Long warehouseId;
    @Excel(name = "仓库编码")
    @NotBlank(message = "仓库编码不能为空")
    @NotNull(message = "仓库编码不能为空")
    @WarehouseCodeCheck
    private String warehouseCode;
    @Excel(name = "仓库名称")
    @NotBlank(message = "仓库名称不能为空")
    @NotNull(message = "仓库名称不能为空")
    private String warehouseName;
    @Excel(name = "仓库位置")
    private String location;
    @Excel(name = "仓库面积")
    @Min(value = 0,message = "面积不能小于零")
    private Double area;
    @Excel(name = "仓库负责人")
    private String charge;
}
